<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();
$devprg_id=$_GET["devprg_id"];
$mode=$_GET["mode"]; 

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$arr_data["rec_status"]=1;


if($devprg_id>0){

	update_qry("bkitc_seva_dev_prg",$arr_data,"sevadev_prg_id=".$devprg_id);
	qry_data("update bkitc_seva_dev_prg set last_updated='".$curTime."' where sevadev_prg_id=".$devprg_id);
}
else{
	$devprg_id=insert_qry("bkitc_seva_dev_prg",$arr_data);
	qry_data("update bkitc_seva_dev_prg set rec_created='".$curTime."' where sevadev_prg_id=".$devprg_id);
}




header("location:edit_sevadevprg.php?mode=edit&devprg_id=".$devprg_id);
?>



